<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>原型与原型链</title>
</head>
<body>
<script>
/*	//1

	var A = function() {};
	A.prototype.n = 1;
	var b = new A();
	A.prototype = {
		n: 2,
		m: 3
	}
	var c = new A();

	console.log(b.n);
	console.log(b.m);

	console.log(c.n);
	console.log(c.m);*/

	/*//2
	var F = function() {};

	Object.prototype.a = function() {
		console.log('a');
	};

	Function.prototype.b = function() {
		console.log('b');
	}

	var f = new F();

	f.a();
	f.b();

	F.a();
	F.b();
*/

/*function Person(name){
	this.name = name;
}
let p = new Person('Tom');
console.log(p.__proto__)
console.log(Person.__proto__)*/


</script>
</body>
</html>